<!DOCTYPE
html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>聊天</title>

<link rel="stylesheet" type="text/css" href="index.css" />
<script src="xheditor-1.1.8/jquery/jquery-1.4.2.min.js"
	type="text/javascript"></script>
<script type="text/javascript">
	/* 阻止事件默认行为 */
	function prDefault(evt) {
		/* IE浏览器 */
		if ($.browser.msie) {
			evt.keyCode = 0;
			evt.returnValue = false;
		} else {
			evt.preventDefault();
		}

	}

	/* 禁用页面刷新 */
	function noRefresh(event) {
		/* F5刷新 */
		if (event.keyCode == 116) {
			prDefault(event);
			return false;
		}

		/* ctrl+r or ctrl+n 刷新 */
		if (event.ctrlKey && (event.keyCode == 78 || event.keyCode == 82)) {
			prDefault(event);
			return false;
		}
		/* shitf +f10 右键菜单 */
		if (event.shiftKey && event.keyCode == 121) {
			prDefault(event);
			return false;
		}
	}

	(function($) {
		$(function() {
			/* 禁用页面右键 */
			$(document).bind("contextmenu", function(event) {
				return false;
			});
		});

	})(jQuery);
</script>
</head>

<body onload="javascript:load()" onkeydown="noRefresh(event)">
	<div id="allDiv">
		<div id="msgDiv"></div>
		<div id="inputDiv">
			<textarea id="inputArea"
				style="width: 100%; overFlow-x: hidden; overFlow-y: scroll;">
				</textarea>
		</div>
	</div>
</body>

</html>